package com.maozzi.passport.web.controller.rest;

import com.maozzi.api.user.UserService;
import com.maozzi.api.user.model.UserDTO;
import com.maozzi.common.util.CloneUtil;
import com.maozzi.passport.web.model.UserVO;
import com.maozzi.passport.web.model.userCenter.UserInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户 controller
 *
 * @author maozi
 */
@RestController
@RequestMapping("/rest/view/user")
public class UserController {
    @Resource
    private UserService userService;

    /**
     * 用户名/密码登录接口
     *
     * @return 返回
     */
//    @GetMapping("/info.json")
//    public UserVO info() {
//        UserInfo userInfo = SsoUtil.get();
//        Long id = userInfo.getId();
//
//        UserDTO dto = userService.getUser(id);
//
//        return CloneUtil.to(dto, UserVO.class);
//    }
}
